<%@ page language="java" pageEncoding="UTF-8" %>
<%@ taglib uri="/struts-tags" prefix="s" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <%@include file="../../common/include_list_head.jsp" %>
    <script type="text/javascript">
          //修改页脚状态
          function updateState(_wid,_state){
              var url = "../jsonVisitor/ajaxSys-updateFooterState.action?"+(new Date()).getTime();
              $.post(url,
                      { wid: _wid,state:_state},
                      function (data) {
                          window.location.reload();
                      }
              );
          }
    </script>
</head>
<body>
<div id="scrollContent">

    <s:if test="actionErrors.size()>0 || actionMessages.size()>0 || fieldErrors.size()>0">
        <div id="SystemErrorMessage">
            <s:actionerror/>
            <s:actionmessage/>
            <s:fielderror/>
        </div>
    </s:if>

    <s:form theme="simple" name="ysform">
        <s:hidden name="pager.formname" value="ysform"/>
        <s:hidden name="pager.currentPageno" id="yspager_currentPageno"/>
    </s:form>

    <div id="userRoleMenuButton">
        <button onclick="openEntity()"><span class="icon_add">新增</span></button>
        <button onclick="doModify()"><span class="icon_edit">修改</span></button>
        <button onclick="doRemove()"><span class="icon_delete">删除</span></button>
    </div>
    <div>
        <table class="tableStyle" style="width:100%;">
            <tr>
                <th width="3%"></th>
                <th nowrap="nowrap" width="40%" align="center">描述</th>
                <th nowrap="nowrap" width="10%" align="center">状态</th>
            </tr>
            <s:iterator value="resultData">
                <tr>
                    <td align="center"><s:checkbox id="%{wid}" name="selectNode" fieldValue="%{wid}"/></td>
                    <td nowrap="nowrap" align="center">
                        <a href="javascript:openEntity('<s:property value="wid"/>')"><font color="blue"><s:property
                                value="des"/></font></a>
                    </td>
                    <td nowrap="nowrap" align="center">
                        <a href="javascript:updateState('<s:property value="wid"/>','<s:property value="state"/>')"><font color="blue">
                            <s:if test="state==1">启用</s:if><s:else>禁用</s:else></font>
                        </a>
                    </td>
                </tr>
            </s:iterator>
        </table>
    </div>
</div>
</body>
</html>
